// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 新增数据资产字段 新增数据资产字段 POST /dataAssetsField/addField */
export async function addFieldUsingPost(
  body: dataFactory.AddFieldDTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/dataAssetsField/addField', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除数据资产字段 通过ID删除数据资产字段 DELETE /dataAssetsField/deleteField/${param0} */
export async function deleteFieldUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.deleteFieldUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<dataFactory.R>(`/dataAssetsField/deleteField/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取数据资产字段 通过ID获取数据资产字段 GET /dataAssetsField/getField/${param0} */
export async function getFieldUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.getFieldUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<dataFactory.R>(`/dataAssetsField/getField/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 更新数据资产字段 更新数据资产字段 PUT /dataAssetsField/updateField */
export async function updateFieldUsingPut(
  body: dataFactory.UpdateFieldDTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/dataAssetsField/updateField', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
